package com.algo.animal;

import org.springframework.stereotype.Component;

@Component
public class Cat implements FoodStuffAware {

    private FoodStuff foodStuff;

    public Cat() {
    }

    public void eat() {
        System.out.println("cat eat " + foodStuff.getName());
    }

    @Override
    public void setFoodStuff(FoodStuff foodStuff) {
        this.foodStuff = foodStuff;
    }


}
